aboutsummaryrefslogtreecommitdiff
path: root/src/pages/portfolio/[id].astro
blob: 7424b91722f46b070eee5ad5052ae2a236312483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import PortfolioSingleLayout from "@/layouts/PortfolioSingleLayout.astro";

export const getStaticPaths: GetStaticPaths = async () => {
  const entries = await getCollection("portfolio");
  return entries.map((entry: any) => ({
    params: { id: entry.id },
    props: { entry },
  }));
};

const { entry } = Astro.props;
---

<PortfolioSingleLayout entry={entry} />